package day1101_1;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class O4 {
    public static void main(String[] args) throws IOException {
        //1.创建输入流对象
        FileInputStream  fis=new FileInputStream("src\\main\\java\\day1101_1\\O1.java");
        BufferedInputStream bis=new BufferedInputStream(fis);//加快效率

        //2.
        byte[]  bs=new byte[1024];
        int length=0;
        while(  (length=bis.read(bs))  != -1 ){
            System.out.println(   new String(bs,0,length)   );
        }

        //3.关闭IO流
        bis.close();//关闭缓冲流(bis的close方法内自动关闭文件输入流fis)
    }
}


